<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
    <head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<meta http-equiv="Pragma" content="no-cache" />
		<meta http-equiv="Cache-Control" content="no-cache" />
		<meta http-equiv="Expires" content="0" />
		<meta http-equiv="X-UA-Compatible" content="E=edge;chrome=1" />
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
		<title>嘉华金融</title>
        <link rel="stylesheet" type="text/css" href="<%=path%>/static/css/reset.css">
	    <link rel="stylesheet" type="text/css" href="<%=path%>/static/css/weui.min.css">
	    <link rel="stylesheet" type="text/css" href="<%=path%>/static/css/index.css">
	    <script type="text/javascript" src="<%=path%>/static/js/jquery-3.2.1.min.js"></script>
	    <script type="text/javascript" src="<%=path%>/static/layer/layer.js"></script>
	    <script type="text/javascript" src="<%=path%>/static/js/weui.min.js"></script>
    </head>
<body>
    
    <div>
        <div class="header">
            <div><!-- <div class="back"></div> --></div>
            <div>会员中心</div>
            <div><!-- <div class="user-img"></div> --></div>
        </div>
        <div class="main">
            <div class="user-banner">
                <div class="account">账户余额&nbsp;&nbsp;(元)</div>
                <div class="account-n">${buserInfo.income}</div>
                <div class="user-choose">
                    <div id="cashPresent">立即提现</div>
                    <div id="detailIncome">收入明细</div>
                </div>
            </div>
            <div class="user-wrap">
                <div class="weui-cells">
                    <a class="weui-cell weui-cell_access" href="<%=path%>/member/memberMessage.html">
                        <div class="weui-cell__hd message-icon userP-icon"></div>
                        <div class="weui-cell__bd">
                            <p>个人信息</p>
                        </div>
                        <div class="weui-cell__ft"></div>
                    </a>
                    <a class="weui-cell weui-cell_access" href="<%=path%>/dealerInfor.html">
                        <div class="weui-cell__hd dealer-icon userP-icon"></div>
                        <div class="weui-cell__bd">
                            <p>经销商信息</p>
                        </div>
                        <div class="weui-cell__ft"></div>
                    </a>
                   <%--  <a class="weui-cell weui-cell_access" href="<%=path%>/getMemberCenter.html">
                        <div class="weui-cell__hd loan-icon userP-icon"></div>
                        <div class="weui-cell__bd">
                            <p>贷款记录</p>
                        </div>
                        <div class="weui-cell__ft"></div>
                    </a> --%>
                    <%--  <a class="weui-cell weui-cell_access" href="javascript:message();"href="<%=path%>/statistics.html">
                        <div class="weui-cell__hd distribution-icon userP-icon"></div>
                        <div class="weui-cell__bd">
                            <p>分销统计</p>
                        </div>
                        <div class="weui-cell__ft"></div>
                    </a> --%>
                     <a class="weui-cell weui-cell_access" href="<%=path%>/member/share.html">
                        <div class="weui-cell__hd share-icon userP-icon"></div>
                        <div class="weui-cell__bd">
                            <p>推广分享</p>
                        </div>
                        <div class="weui-cell__ft"></div>
                    </a>
                    <a class="weui-cell weui-cell_access"  href="<%=path%>/member/bankCard.html">
                        <div class="weui-cell__hd card-icon userP-icon"></div>
                        <div class="weui-cell__bd">
                            <p>银行卡管理</p>
                        </div>
                        <div class="weui-cell__ft"></div>
                    </a>
                   <c:choose>
                     <c:when test="${buserInfo.authInfo==null}">
                     <a class="weui-cell"  href="<%=path%>/member/enterprise.html">
                     <div class="weui-cell__hd id-icon2 userP-icon"></div>
                     <div class="weui-cell__bd">
                         <p>身份认证</p>
                     </div>
                        <div class="weui-cell__ft id-text">未认证</div>
                         <div class="weui-cell__ft"></div>
                        </a>
                     </c:when>
                     <c:when test="${authInfo.state==1}">
                     <!-- <a class="weui-cell">
                          <div class="weui-cell__hd id-icon2 userP-icon"></div>
                          <div class="weui-cell__bd">
                              <p>身份认证</p>
                          </div>
                       <div class="weui-cell__ft id-text">审核中</div>
                      </a> -->
                     </c:when>
                     <c:when test="${authInfo.state==2}">
                     <a class="weui-cell"  href="<%=path%>/member/enterprise.html">
                          <div class="weui-cell__hd id-icon2 userP-icon"></div>
                          <div class="weui-cell__bd">
                              <p>身份认证</p>
                          </div>
                          <div class="weui-cell__ft id-text">未通过</div>
                      </a>
                     </c:when>
                     <c:otherwise> 
                      <a class="weui-cell">
                          <div class="weui-cell__hd id-icon2 userP-icon"></div>
                          <div class="weui-cell__bd">
                              <p>身份认证</p>
                          </div>
                          <div class="weui-cell__ft id-text">已认证</div>
                      </a>
                     </c:otherwise>
                   </c:choose>
                </div>
            </div>
           <a href="<%=path%>/login/logout.html"><div class="off">注销登录</div></a>
        </div>
    </div>
<script type="text/javascript">
  var path="<%=path%>";
  var income=Number("${buserInfo.income}");
  $("#cashPresent").click(function(){
    if($(".id-text").text()!="已认证"){
	   layer.msg("请先完成身份认证");
	   return false;
     }else if(income < 100){
    	layer.msg("账号余额不满100元")
    }else{
    	window.location=path+"/member/cashPresent.html";
    }
  })
  
  $("#detailIncome").click(function(){
      window.location=path+"/member/incomeStatistics.html";     
  })
  function message(){
	 layer.msg("该功能暂未开放");
  }

</script>
</body>
</html>
